﻿package
{
	import anshe.widget.AnsheWebLoader;
	
	import flash.events.Event;
	
	import web.WebUserInput;

	public class RussianBoxWebLoader extends AnsheWebLoader
	{
		public var mcLogin:WebUserInput;	//	用户输入框
		
		public function RussianBoxWebLoader(fName:String=null)
		{
			super("Tetris", false);
			
			this.mcWait.visible = false;
			this.mcLogin.visible = true;
			
			this.mcLogin.addEventListener(WebUserInput.USER_LOGIN, onUserLogin);	
		}
		
		private function onUserLogin(e:Event):void
		{
			this.mcLogin.removeEventListener(WebUserInput.USER_LOGIN, onUserLogin);
			
			this.myName = this.mcLogin.userName;

			this.mcLogin.visible = false;
			this.mcWait.visible = true;
			
			this.InitLoader();
		}
	}
}